package com.nercel.dsj.gksales.exception;

/**
 * @author sunlin
 * @date 2018-10-31
 */
public class RestApiException extends RuntimeException  {
    private Integer code;

    // 给子类用的方法
    public RestApiException(ResponseCode responseCodeEnum) {
        this(responseCodeEnum.getMessage(), responseCodeEnum.getCode());
    }

    public RestApiException(String message, Integer code) {
        super(message);
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
